wordpress single post get category name

37

wordpress single post get category name -

$category = get_the_category();
$firstCategory = $category[0]->cat_name;

Comments

Submit
0 Comments